package dto

data class AppConfig(
    val botToken: String,
    val assistantUrl: String,
    val ktorPort: String,
    val redisHost: String,
    val redisPort: String,
    val excludedChatId: String,
    val groupChatId: String,
    val admin: String,
)

fun loadAppConfigFromEnvironment(): AppConfig {

    return AppConfig(
        botToken = System.getenv("BOT").orEmpty(),
        assistantUrl = System.getenv("ASS_URL").orEmpty(),
        ktorPort = System.getenv("KTOR_PORT").orEmpty(),
        redisHost = System.getenv("REDIS_HOST").orEmpty(),
        redisPort = System.getenv("REDIS_PORT").orEmpty(),
        excludedChatId = System.getenv("EXCLUDED_CHAT_ID").orEmpty(),
        groupChatId = System.getenv("GROUP_CHAT_ID").orEmpty(),
        admin = System.getenv("ADMIN").orEmpty(),
    )
}